﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Comments.aspx.cs" Inherits="DoAn_BumTruong_DesignPattern.Admin.Comments" %>

<%@ Register Src="../Controls/Pages.ascx" TagName="Pages" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="js/js.js"></script>
    <style type="text/css">
        .backcolor {
            background-color: #efe8e8;
        }

        th {
            border: 1px inherit;
        }

        tr:hover {
            background-color: #0094ff;
        }

        .parent {
        }

        .name {
            width: 100px;
        }

        .description {
            width: 450px;
        }

        .id {
            text-align: center;
        }

        .alias {
            width: 120px;
        }

        a {
            text-decoration: inherit;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderAdmin" runat="server">
    <div class="round round-content">
        <input type="button" value="Add" onclick='location.href = "EditMenu.aspx"' class="myButton" />
        <asp:Button ID="btDelete" runat="server" Text="Delete" CssClass="myButton" />
    </div>
    <br />
    <div class="round round-content">
        <asp:Repeater ID="RepeaterComment" runat="server">
            <HeaderTemplate>
                <table>
                    <tr>
                        <th>
                            <input type="checkbox" id="chkAll" /></th>
                        <th>Client</th>
                        <th class="name">CreateDate</th>
                        <th class="description">Context</th>
                        <th>ShowHide</th>
                        <th>Avata</th>
                        <th class="name">Article Title</th>
                        <th>ID</th>
                    </tr>
            </HeaderTemplate>
            <AlternatingItemTemplate>
                <tr>
                    <td>
                        <input type="checkbox" value='<%#Eval("CommentID")%>' name="Id" />
                    </td>
                    <td class="id">
                        <%#Eval("Client")%>
                    </td>
                    <td>
                        <%#Eval("CreateDate","{0:dd/MM/yyyy}")%>
                    </td>
                    <td>
                        <%#Eval("Context")%>
                    </td>
                    <td class="id">
                        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="UpdateActive" CommandArgument='<%#Eval("CommentID")+"_"+Eval("ShowHide") %>' CssClass='<%#Eval("ShowHide").ToString()=="False"?"cross":"tick" %>'></asp:LinkButton>
                    </td>
                    <td class="id">
                        <%#Eval("Avata")%>
                    </td>
                    <td class="id">
                        <%#Eval("ArticleID")%>
                    </td>
                    <td class="id">
                        <%#Eval("CommentID")%>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <ItemTemplate>
                <tr class="backcolor">
                    <td>
                        <input type="checkbox" value='<%#Eval("CommentID")%>' name="Id" />
                    </td>
                    <td class="id">
                        <%#Eval("Client")%>
                    </td>
                    <td>
                        <%#Eval("CreateDate","{0:dd/MM/yyyy}")%>
                    </td>
                    <td>
                        <%#Eval("Context")%>
                    </td>
                    <td class="id">
                        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="UpdateActive" 
                            CommandArgument='<%#Eval("CommentID")+"_"+Eval("ShowHide") %>' CssClass='<%#Eval("ShowHide").ToString()=="False"?"cross":"tick" %>'></asp:LinkButton>
                    </td>
                    <td class="id">
                        <%#Eval("Avata")%>
                    </td>
                    <td class="id">
                        <%#Eval("ArticleID")%>
                    </td>
                    <td class="id">
                        <%#Eval("CommentID")%>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <uc1:Pages ID="PagesButton" runat="server" />
    </div>

</asp:Content>
